package com.example.cameraxpush;

import androidx.appcompat.app.AppCompatActivity;
import androidx.camera.view.PreviewView;

import android.os.Bundle;
import android.os.Environment;
import android.view.SurfaceHolder;
import android.view.SurfaceView;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);


//        SurfaceView surfaceView= findViewById(R.id.surfaceView);
//        SurfaceHolder holder = surfaceView.getHolder();
//        CameraOneHelper cameraOneHelper = new CameraOneHelper(720,1080,this);
//        cameraOneHelper.setPreviewDisplay(holder);
//        holder.addCallback(cameraOneHelper);

        PreviewView previewView = findViewById(R.id.previewView);

        CameraXHelper cameraXHelper = new CameraXHelper(this,previewView,1280 ,720);
//        cameraXHelper.setSavePath(this.getExternalFilesDir("cameraPush").getAbsolutePath());
        cameraXHelper.setSavePath(Environment.getExternalStorageDirectory().getAbsolutePath());
    }
}